﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2010-02-24 16:03:11Z</CreationDate>
</File>
*/
#endregion

using System;
using System.ComponentModel;
using System.Windows;

namespace Outcoder.UI.Xaml
{
	/* TODO: [DV] Comment. */
	[Obsolete("Use EnvironmentValues instead.")]
	public static class DesignTimeEnvironment
	{
		static bool? designTime;

		public static bool DesignTime
		{
			get
			{
				if (!designTime.HasValue)
				{
#if SILVERLIGHT
					designTime = DesignerProperties.IsInDesignTool;
#else
					designTime = (bool)DesignerProperties.IsInDesignModeProperty.GetMetadata(
						typeof(DependencyObject)).DefaultValue;
#endif
				}

				return designTime.Value;
			}
		}
	}
}
